Platform Explorer / Nuxeo Platform 2023.22

Operation Document.SetBlob (Set File)

Description

Set the input file to the given property on the input document. If the xpath points to a blob list then the blob is appended to the list, otherwise the xpath should point to a blob property. If the save parameter is set the document modification will be automatically saved. Return the document.
Operation id Document.SetBlob
AliasesBlob.Set
Category Document
Label Set File
Requires
Since

Parameters

Name Description Type Required Default value
file blob yes  
save boolean no true 
xpath string no file:content 

Signature

Inputs document, documents
Outputs document, documents

Implementation Information

Implementation Class Class: org.nuxeo.ecm.automation.core.operations.document.SetDocumentBlob
Contributing Component org.nuxeo.ecm.core.automation.coreContrib

JSON Definition

{
  "id" : "Document.SetBlob",
  "aliases" : [ "Blob.Set" ],
  "label" : "Set File",
  "category" : "Document",
  "requires" : null,
  "description" : "Set the input file to the given property on the input document. If the xpath points to a blob list then the blob is appended to the list, otherwise the xpath should point to a blob property. If the save parameter is set the document modification will be automatically saved. Return the document.",
  "url" : "Document.SetBlob",
  "signature" : [ "document", "document", "documents", "documents" ],
  "params" : [ {
    "name" : "file",
    "description" : null,
    "type" : "blob",
    "required" : true,
    "widget" : null,
    "order" : 0,
    "values" : [ ]
  }, {
    "name" : "save",
    "description" : null,
    "type" : "boolean",
    "required" : false,
    "widget" : null,
    "order" : 0,
    "values" : [ "true" ]
  }, {
    "name" : "xpath",
    "description" : null,
    "type" : "string",
    "required" : false,
    "widget" : null,
    "order" : 0,
    "values" : [ "file:content" ]
  } ]
}